<template>
	<!-- 实物帐户列表 -->
	<div>
    <el-breadcrumb class="breadcrumb" separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>实物帐户列表</el-breadcrumb-item>
    </el-breadcrumb>
		<el-table border :data="goodsArr" style="width: 100%" max-width="900">
				<el-table-column width="100" prop="supplierId" label="序号" show-overflow-tooltip>
				</el-table-column>
				<el-table-column  prop="supplierContact" label="投资人" show-overflow-tooltip>
				</el-table-column>
				<el-table-column prop="totalQty" label="投资总数量">
				</el-table-column>
				<el-table-column prop="shipmentQty" label="出货数量">
				</el-table-column>
				<el-table-column prop="residueQty" label="结存数量">
				</el-table-column>
				<el-table-column label="操作">
					<template slot-scope="scope">
						<el-button size="small"  @click="detail(scope.row.supplierId)" type="success">查看明细</el-button>
					</template>
				</el-table-column>
			</el-table>
		<el-pagination class="page-num" background layout="prev, pager, next" :page-size="page_size" @current-change="handleCurrentChange" :total="page">
		</el-pagination>
	</div>
</template>
<script>
	export default {
		name: 'manage',
		data() {
			return {
				title:'',
				goodsArr: [],
				params: {
					"numPerPage": 10,
					"order": "desc",
					"pageNum": 1,
  					"shelfStatus": "DBL"
				},
				page_size: 10, //每页显示几个
				page: 0, //总页数
				currentPage: 1, //当前页
			};
		},
		components: {
		},
		created() {

		},
		mounted() {
			this.getList();
		},

		methods: {
			/*分页跳转*/
			handleCurrentChange: function(currentPage) {
				this.currentPage = currentPage;
				this.getList();
			},
			// 获取列表
			getList() {
				this.params.pageNum = this.currentPage;
				this.$post("SEAccountList", this.params).then(res => {
					if(res.code == 200) {
						this.goodsArr = [];
						this.page = res.data.total;
						var list = res.data.rows;
						for(var i in list) {
							this.goodsArr.push(list[i]);
						}
					} else {
						this.$msg.warning(res.message);
					}
				});
			},
			detail(id){
				this.$router.push({
					name: 'physicalDetail',
					params: {
						id: id
					}
				})
			}
		},
	}
</script>
<style type="text/css">
</style>